package com.cn.lp.jpa.cq.domain;

import com.cn.lp.jpa.cq.CQLogicalType;

/**
 * Created by on 2019/8/7.
 */
public class CQBlockSign implements CQSignItem {

    private boolean start;

    private CQLogicalType logicalType;

    public static CQBlockSign of(CQLogicalType logicalType, boolean start) {
        CQBlockSign blockSign = new CQBlockSign();
        blockSign.start = start;
        blockSign.logicalType = logicalType;
        return blockSign;
    }

    public boolean isStart() {
        return start;
    }

    @Override
    public CQLogicalType getLogicalType() {
        return logicalType;
    }

    @Override
    public String getText() {
        return start ? "beginBlock" : "endBlock";
    }

}
